import delimited "prelim_refs_jop_rep_data.csv", clear 
*MODEL 1: BIVARIATE ANALYSIS WITH FIXED EFFECTS
 
regress referral c.net_eu_int_support i.cluster_var1, vce(cluster cluster_var)

*MODEL 2: INCLUDE CONTROL VARIABLES

regress referral c.net_eu_int_support i.ecj_low_trust i.high_court c.eu_memb_diff  c.intra_eu_trade_share i.monist i.legal_origin1 c.gdp_growth i.founding_member c.gdp_share c.govt_lr i.cluster_var1, vce(cluster cluster_var)

margins,at(net_eu_int_support=(-50(1)50)) level(90) saving(model2_predictions_90)


*MODEL 3: INTERACTION BETWEEN POLICY DIFF AND ECJ TRUST

regress referral c.net_eu_int_support##i.ecj_low_trust i.cluster_var1, vce(cluster cluster_var)

*MODEL 4: INTERACTION BETWEEN POLICY DIFF AND ECJ TRUST WITH CONTROLS

regress referral c.net_eu_int_support##i.ecj_low_trust i.high_court c.eu_memb_diff  c.intra_eu_trade_share i.monist i.legal_origin1 c.gdp_growth i.founding_member c.gdp_share c.govt_lr i.cluster_var1, vce(cluster cluster_var)

margins ,at(net_eu_int_support=(-50(1)50) ecj_low_trust=(0 1)) level(90) saving(model4_predictions_90)



*MODEL 5: INTERACTION BETWEEN POLICY DIFF AND HIGH COURT

regress referral c.net_eu_int_support##i.high_court i.cluster_var1, vce(cluster cluster_var)

*MODEL 6: INTERACTION BETWEEN POLICY DIFF AND HIGH COURT WITH CONTROLS

regress referral c.net_eu_int_support##i.high_court i.ecj_low_trust c.eu_memb_diff  c.intra_eu_trade_share i.monist i.legal_origin1 c.gdp_growth i.founding_member c.gdp_share c.govt_lr i.cluster_var1, vce(cluster cluster_var)
margins ,at(net_eu_int_support=(-50(1)50) high_court=(0 1)) level(90) saving(model6_predictions_90)
